<script setup lang="ts">
import { kpidata } from "../index";

</script>

<template>
  <div class="center-bottom-wrap">
    <div class="top-cards">
      <div class="main-card">
        <div class="main-card-title">
          <img src="@/assets/img/titles/zuo.png" class="card-title-icon" />
          调解案件总数
        </div>
        <div class="main-card-value">{{kpidata.tjaj}}件 <span style="font-size: 14px;color: aquamarine;">（成功{{kpidata.tjcg}}件）</span> </div>
        <div class="main-card-desc">
           调解成功率 <span class="down">{{ kpidata.cgl }}</span>
        </div>
      </div>
      <div class="main-card">
        <div class="main-card-title">
          <img src="@/assets/img/titles/zuo.png" class="card-title-icon" />
          调解协议已履行 <span class="kpi">超KPI</span>
        </div>
        <div class="main-card-value">{{kpidata.ylx}}件</div>
        <div class="main-card-desc">
          协议履行率 <span class="up">{{ kpidata.lxl }}</span>  &nbsp; | &nbsp; 目标量 <span class="desc">95.07%</span>
        </div>
      </div>
    </div>
    <div class="bottom-cards">
      <div class="sub-card">
        <div class="sub-card-title">达成书面协议</div>
        <div class="sub-card-value">{{kpidata.dcsmxy}}件</div>
        <!-- <div class="sub-card-desc">
          同比 <span class="down">11.83%</span> ↓ &nbsp; 占比 <span class="desc">38.16%</span>
        </div> -->
      </div>
      <div class="sub-card">
        <div class="sub-card-title">司法确认案件 <span class="tag">检测指标</span></div>
        <div class="sub-card-value">{{kpidata.sfqraj}}件 <span class="sub-card-desc" style="font-size: 11px">司法确认占比 <span class="desc">{{ kpidata.qrl }}</span></span></div> 

        <!-- <div class="sub-card-desc">
          司法确认占比 <span class="desc">9.31%</span>
        </div> -->
      </div>
      <div class="sub-card">
        <div class="sub-card-title">行专调解案件 <span class="tag">检测指标</span></div>
        <div class="sub-card-value">{{kpidata.hztjaj}}件<span class="sub-card-desc" style="font-size: 11px"> 行专调解占比 <span class="desc">{{ kpidata.xzzb }}</span></span></div>
        
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.center-bottom-wrap {
  width: 100%;
  height: 100%;
  //display: flex;
  flex-direction: column;
  justify-content: space-between;
  .top-cards {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    .main-card {
      flex: 1;
      background: rgba(10, 32, 70, 0.95);
      border-radius: 12px;
      margin-right: 18px;
      padding: 18px 24px 12px 24px;
      box-shadow: 0 2px 8px 0 rgba(0,0,0,0.08);
      color: #7eb7fd;
      position: relative;
      &:last-child { margin-right: 0; }
      .main-card-title {
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        .card-title-icon {
          width: 24px;
          height: 14px;
          margin-right: 8px;
        }
        .kpi {
          background: #ff4d4f;
          color: #fff;
          font-size: 12px;
          border-radius: 4px;
          padding: 2px 6px;
          margin-left: 8px;
        }
      }
      .main-card-value {
        font-size: 20px;
        font-weight: bold;
        color: #00eaff;
        margin-bottom: 6px;
        letter-spacing: 2px;
      }
      .main-card-desc {
        font-size: 13px;
        color: #b0cfff;
        .up { color: #ffb400; }
        .down { color: #00eaff; }
        .desc { color: #ffd700; }
      }
    }
  }
  .bottom-cards {
    display: flex;
    justify-content: space-between;
    .sub-card {
      flex: 1;
      background: rgba(31, 99, 163, 0.18);
      border-radius: 10px;
      margin-right: 5px;
      padding: 14px 18px 10px 18px;
      color: #7eb7fd;
      position: relative;
      &:last-child { margin-right: 0; }
      .sub-card-title {
        font-size: 15px;
        font-weight: 500;
        margin-bottom: 6px;
        .tag {
          background: rgba(98, 220, 10, 0.64);
          color: #fff;
          font-size: 11px;
          border-radius: 3px;
          padding: 1px 5px;
          margin-left: 6px;
        }
      }
      .sub-card-value {
        font-size: 20px;
        font-weight: bold;
        color: #00eaff;
        margin-bottom: 4px;
        letter-spacing: 1px;
      }
      .sub-card-desc {
        font-size: 12px;
        color: #b0cfff;
        .up { color: #ffb400; }
        .down { color: #00eaff; }
        .desc { color: #ffd700; }
      }
    }
  }
}
</style>
